package hua.mtreader.feature.bookshelf.presenter;

import java.lang.ref.WeakReference;

import hua.mtreader.base.BaseFragmentPresenter;
import hua.mtreader.feature.bookshelf.bean.BookshelfRepsone;
import hua.mtreader.feature.bookshelf.model.IBookshelfModel;
import hua.mtreader.feature.bookshelf.model.BookshelfModelImpl;
import hua.mtreader.feature.bookshelf.view.IBookshelfView;

/**
 * Created by Administrator on 2017/3/22.
 */
public class BookshelfPresenter extends BaseFragmentPresenter<IBookshelfView> {

    private IBookshelfModel bookshlefModel;

    public BookshelfPresenter() {
        bookshlefModel = new BookshelfModelImpl();
    }

    public void getBooks() {
        bookshlefModel.getBooks(new BookshelfModelImpl.BookshelfListener() {
            @Override
            public void onLoadBooksSuccess(BookshelfRepsone repsone) {
                mViewRef.get().onLoadBooksSuccess(repsone);
            }
        });
    }




}
